package day04;
import java.util.Scanner;//导入java.util包中的Scanner类
public class ScannerDemo {
    public static void main(String[] args) {
        Scanner one =new Scanner(System.in);//新建一个扫描仪叫one(括号里面传参，输入流)
        System.out.println("输入年龄");
        int age =one.nextInt();
        //有个int nextInt方法 无参有返回值
        System.out.println("年龄为:"+age);
        System.out.println("请输入价格");
        double price=one.nextDouble();
        System.out.println("价格为:"+price);

        /*
        * pack java.util
        * class Scanner{
        * Scanner(InputStream s){...{
        * int nextInt(){...}
        * double nextDDouble(){...}
        *
        * }*/
    }
}
